home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 43.zip / CU Amiga 15b.adf / brush_4d.doc / brush_4d.doc
Text File  |  1991-06-06  |  19KB  |  604 lines

  1. December 1990                   BRUSH_4D v. 1.2
  2.  
  3.                                 ----------------
  4.  
  5.  
  6.  
  7. Files:
  8.  
  9.            Brush_4D Program.
  10.  
  11.            This doc file.
  12.  
  13.            Help picture.
  14.  
  15.  
  16.  
  17.                   Copyright © 1990 by Bruce Thomson
  18.  
  19.  
  20.  
  21.                            S H A R E W A R E
  22.  
  23.  
  24.  
  25. Brush_4D is ShareWare.  No guarantee is made, expressed or 
  26. implied as to Brush_4D's suitability for any application.  No 
  27. responsibility will be taken by the author for any results of its 
  28. use or misuse.
  29.  
  30.  
  31.  
  32. This is Shareware.  It is not the best version of this program 
  33. available.  For most people this version will be more than 
  34. adequate.  It coverts brushes with a maximum of 200 x 200 pixels 
  35. and will create objects with a maximum of 2000 faces.  It has all 
  36. the features of the larger version except for this size 
  37. restriction.  If you use this program then please send $US10 to the 
  38. address below.  If you want the unrestricted version send $US30 to 
  39. register.  If you think you might want the unrestricted version at 
  40. a later date send $10 now and $20 later.  Registered users will be 
  41. sent updates.
  42.  
  43.  
  44.  
  45.  
  46.  
  47. 1.      What Does It Do?
  48.  
  49.  
  50.  
  51.     Brush_4D converts IFF brushes (e.g. DPaint pictures) into 
  52. Sculpt objects.  The program will convert standard brushes, Extra 
  53. Halfbrite brushes and HAM brushes in full colour.  It is quite 
  54. fast.
  55.  
  56.     In addition to converting your brush into a flat object, 
  57. pixel for pixel Brush_4D has some extra features.
  58.  
  59.  
  60.  
  61. - Optimise the brush so that areas of the same colour become 
  62. one large square as opposed to many small ones.
  63.  
  64. - Make any colours transparent.
  65.  
  66. - Wrap brush around a tube or part of tube.
  67.  
  68. - Wrap brush onto a sphere.
  69.  
  70. - Wrap brush with some special effects.
  71.  
  72. - Each colour of the brush can be of a different texture.
  73.  
  74. - With HAM images allow extra optimisation through a HAM 
  75. colour closeness setting.
  76.  
  77.  
  78.  
  79. 2.      How Do I Use It?
  80.  
  81.  
  82.  
  83. Brush_4D runs from CLI or Workbench and is easy to use.  It needs 
  84. about 110K of free memory as well as the screen memory for your 
  85. picture.
  86.  
  87. When running respond to the requesters in turn and the object 
  88. file will be created to load into Sculpt 4D as an object or scene.
  89.  
  90. You will need a copy of 'req.library' in your LIBS: directory.
  91.  
  92.  
  93.  
  94. 3.      How Does It Work?
  95.  
  96.  
  97.  
  98. Brush_4D loads in the brush as a picture and displays it on its 
  99. own screen.  Specify the type of conversion required and any extra 
  100. parameters.     Based on your input any colours you have specified 
  101. to be transparent (and thus not converted as part of the object) 
  102. will be blocked out on the picture.
  103.  
  104. Brush_4D will then proceed to analyse the picture and convert the 
  105. pixels into pairs of sculpt faces making up squares with that 
  106. block's colour.
  107.  
  108. If the optimise option has been selected rectangular areas of the 
  109. same colour will be converted into one large block as opposed to 
  110. many individual pixels of the same colour.  Depending on the brush, 
  111. optimisation of up to around 90% can be achieved, giving a great 
  112. saving in memory and object faces.
  113.  
  114. When the whole brush has been converted the points will be 
  115. wrapped around the selected shape if one has been chosen. The data 
  116. will be written out, ready to be loaded into Sculpt Animate/4D/3D 
  117. etc. as an object.
  118.  
  119. You will be told of the number of vertices, edges, faces and file 
  120. size of the object, along with the percentage of points made 
  121. transparent and the percentage of compression performed.
  122.  
  123.  
  124.  
  125. 4.      Wraps.
  126.  
  127.  
  128.  
  129. Apart from just converting your brush into a flat, 2D rectangular 
  130. plane Brush_4D can wrap your image onto certain 3D shapes.  These 
  131. are a tube, a sphere and  various sinusoidal waves.  For example 
  132. you can wrap a picture of a face onto a sphere to get a reasonable 
  133. 3D head.
  134.  
  135. The sphere and sine wave are based on the wrap to tube.  With 
  136. wrap to tube you get an upright tube with the X values of the 
  137. pixels wrapped around a circle and the Y values making up the 
  138. height of the tube.
  139.  
  140. Spheres are made by adjusting the diameter of the tube at each 
  141. height level so that it is squashed in at the top and bottom and 
  142. stretched out in the middle.
  143.  
  144. Sine waves are made by modifying the diameter of the tube to 
  145. match a sine wave with several parameters (see below).
  146.  
  147.  
  148.  
  149. 5.      The Inputs.
  150.  
  151.  
  152.  
  153. A series of requesters will pop up which you will use to specify 
  154. the conversion type and specifications.  For each click on the 
  155. preferred alternative or enter a value in the range offered.
  156.  
  157. First you must select the filename for the IFF brush.
  158.  
  159.  "Wrap type Flat or Wrapped" 
  160.  
  161. Flat    - The picture will be converted to a flat, 2D 
  162. object.
  163.  
  164. Wrap    - Choose one of the below wrap types.
  165.  
  166. "Wrap type Tube Sphere or Sine"
  167.  
  168. Tube    - The picture will be wrapped around a tube.  
  169.  
  170. You will be prompted for two responses at this point.
  171.  
  172. "Bend level for tube ..."
  173.  
  174. Enter a number in the range 0 to 1.  This will be the 
  175. proportion of a circle that is turned through.
  176.  
  177. 0 will make a flat object.  1 will wrap completely
  178.  
  179. around a tube.  0.5 will wrap to a half tube.
  180.  
  181. See help picture.
  182.  
  183. "Bend forwards or backwards..."
  184.  
  185. You should decide whether the picture will be curled around 
  186. the tube clockwise (backwards) or anticlockwise 
  187. (forwards).      Forwards is normally used, to preserve 
  188. correct orientation.
  189.  
  190.  See help picture.
  191.  
  192.  
  193.  
  194. Sphere  - You will be prompted for the values as in the Tube 
  195. option.  Wrap to sphere works by wrapping to a tube and 
  196. then altering the diameter of the tube at each point to 
  197. match a sphere.  By doing this the picture will look a 
  198. little squashed towards the top and bottom of the sphere.
  199.  
  200.  
  201.  
  202. Sine    - You need to enter the values for wrap to tube and 
  203. then you will be asked for start and end angles for the 
  204. sine wave.  These values are in degrees.
  205.  
  206. Wrapping to sine works by running a wriggle down the side of 
  207. the points mapped to a tube so you can get effects like 
  208. the look of the old style Coke drink bottles.  The start 
  209. and end angles give the range of values through which your 
  210. wriggle will run as it travels down the side of the tube.
  211.  
  212. You will then be asked for "radius offset".
  213.  
  214. This will control how pronounced the wriggle is.
  215.  
  216. Values range from 0 upwards.  A value of 1 is equal to the 
  217. amplitude of the sine wave and higher values will increase 
  218. the diameter of the tube prior to adding the wave thereby  
  219. lessening the effect of the sine wave.  A value of zero 
  220. will give shapes like an hour glass that converge in the 
  221. middle.
  222.  
  223. See help picture.
  224.  
  225.  
  226.  
  227. If you have chosen any of the wrap options you will be given 
  228. the option to select how the wrapping will be done.  If 
  229. you select "Ignore transparent..." as YES then the wrap 
  230. will start at the top left corner and proceed to the 
  231. height and width values you will enter below.
  232.  
  233. If you say NO then the wrap will be based on only non-
  234. transparent colours in the brush.  With this option you 
  235. can choose a tight wrap or a loose wrap.
  236.  
  237.     It can also be used to ensure equal curvature can be 
  238. given to brushes with unequal widths, and to avoid some of 
  239. the squashing and stretching of a wrap to sphere.
  240.  
  241.  
  242.  
  243. "Optimise x pixels..." and "Optimise y pixels..." 
  244.  
  245. If you select optimised for either then rectangles 
  246.  
  247. of one colour will be found and converted to one large 
  248. block.
  249.  
  250. This is fine for flat objects.  However this could cause a 
  251. problem with the wraps, though, as very large areas being 
  252. optimized would cut across the middle of their shape.
  253.  
  254. This can be avoided by entering suitable values for the 
  255. maximum block size.
  256.  
  257.  
  258.  
  259. "X direction" and "Y direction"  will specify the maximum 
  260. number of pixels that can be used in one block.  You will 
  261. not  be prompted for these when you are creating a flat 
  262. object as they would serve no purpose.
  263.  
  264. If you are going to wrap to a tube then it would be best to 
  265. set the  maximum X optimisation, depending on total brush 
  266. width to perhaps 5 pixels.
  267.  
  268. In this way it retains a reasonably circular shape.  If you 
  269. want a smoother circle then use a smaller maximum X 
  270. direction blocking.
  271.  
  272. The level by which you optimise Y depends on the wrap.  With 
  273. a tube you should optimise completely by entering a value 
  274. in excess of the height of the brush.
  275.  
  276. If you are wrapping to a sphere or sine then the same 
  277. considerations as for X optimising apply.
  278.  
  279.   e.g.  To make a simple 3D globe you will want to wrap a 
  280. flat map onto a sphere.
  281.  
  282. If your brush was 100 * 60 pixels then you might use 4 and 3 
  283. for the maximum optimisation levels.  In this way you 
  284. would benefit from optimising areas of one colour but not 
  285. to the extent that large areas such as USSR were flat and 
  286. no longer looked spherical.  Your map would have at a 
  287. minimum 25 segments forming a circle around the equator.
  288.  
  289.  
  290.  
  291. You may not want to convert the whole of the brush.  You 
  292. have the option of using only a portion of the brush 
  293. measured from the top left corner of the picture.
  294.  
  295. On "Width" and "Height" the default values are the 
  296. dimensions of the brush.  If you want something smaller 
  297. enter that instead.  In the restricted size version of 
  298. Brush_4D you will have a maximum area that can be 
  299. converted.   If your entered values are less than the 
  300. maximum then a border will be drawn around the area you 
  301. have selected so you can see just what you have taken.
  302.  
  303.  
  304.  
  305. If you would like different colours to be different textures 
  306. in the object then respond "yes" to "Change Textures?"
  307.  
  308.     All colours start off as being dull.  Enter ranges of 
  309. colours for which you wish to change the texture.  Click 
  310. on the texture of choice from the gadgets.  All colours in 
  311. the range will become this texture.  If you want to alter 
  312. only a single colour use a single number for start and end 
  313. of the range.  "Cancel" the requester to finish entering 
  314. ranges.  Note: This is for non-HAM pictures only.  With 
  315. EHB the half-brite colours must be textured separately 
  316. from their corresponding bright colours.
  317.  
  318.  
  319.  
  320. You are now prompted for any colours that you would like to 
  321. make transparent.  If you have a HAM screen you have only 
  322. the option of making palette colour 0 transparent.  This 
  323. is usually the background colour.
  324.  
  325. If the picture is a non-HAM picture then you will be asked 
  326. for a list of colours you want to be made transparent.  
  327. These numbers correspond to the palette colour in the 
  328. picture.  When you have finished entering colours to be 
  329. made transparent click on "Cancel."
  330.  
  331.  
  332.  
  333. The picture will then be scanned and pixels that are to be 
  334. transparent will be coloured in on non-HAM displays.  On 
  335. HAM displays the background colour will be made 
  336. transparent but not shown on screen.  You will be shown 
  337. what proportion of the pixels in the brush were made 
  338. transparent.
  339.  
  340.  
  341.  
  342. With HAM pictures you will be able to enter a value that 
  343. allows colours that are close to each other to be treated 
  344. as the same colour.  This gives extra optimisation as you 
  345. get more large blocks of one colour rather than say two 
  346. different blocks of almost the same colour.
  347.  
  348. At the prompt "Enter HAM Threshhold..." enter a value of 0 
  349. to 15.  Each pixel has a red, green and blue component and 
  350. your entry is the level that they are allowed to vary from 
  351. the surrounding pixels before they are considered to be a 
  352. different colour. A value of 0 means any difference at all 
  353. between pixel colours will be detected.
  354.  
  355. A value of 5 will allow for example any colours between dull 
  356. orange and medium orange to be treated as one colour.
  357.  
  358. A value of 15 will make the program think that all the 
  359. colours are the same.
  360.  
  361. Higher values result in less detailed colouring of the 
  362. object but fewer faces.
  363.  
  364.  
  365.  
  366. 6.      While it Runs.
  367.  
  368.  
  369.  
  370. Once you have entered these values sit back and depending on the 
  371. size of the brush up to a minute later the conversion will be done.
  372.  
  373. The graphic screen that Brush_4d works on is behind its selection 
  374. screen.  You can drag down its screen to watch it in progress.
  375.  
  376. As the picture is processed, in non-HAM screens the points 
  377. converted
  378.  
  379. will be blocked out as it goes.  In HAM screens because writing 
  380. to the screen would change the colours and mess it up you can get 
  381. an idea of where it is up to by choosing a new height value of a 
  382. couple of pixels less than the maximum and you will see a line run 
  383. across the bottom.
  384.  
  385.  
  386.  
  387. When all the processing is done you will be shown the exact 
  388. number of vertices, edges and faces used in the object and the file 
  389. size. You will also be told the level of compression of the non-
  390. transparent colours if you had any optimisation on.  
  391.  
  392. Now enter the filename that you would like the object saved 
  393. under.  If you decide that you don't want this object after all 
  394. then click on 'Forget it' or the close gadget and then 'Abort'.
  395.  
  396.  
  397.  
  398. 7.      Tips.
  399.  
  400.  
  401.  
  402. Don't click the hidden forward/back gadgets on the graphic screen 
  403. as they leave an outline that may turn up in your object.
  404.  
  405.  
  406.  
  407. Fewer colours will result in higher compression levels but you 
  408. should balance the memory saving against the look of the object.
  409.  
  410.  
  411.  
  412. If you want smaller objects then reduce the brush before 
  413. conversion or reduce the number of colours on a program like Deluxe 
  414. Photolab.
  415.  
  416.  
  417.  
  418. Name your objects when they are loaded in as when you have 
  419. transparent colours the various parts may not be connected so you 
  420. will want an easy way of selecting the whole object.
  421.  
  422.  
  423.  
  424. When wrapping to a sphere you can get quite a bit of distortion 
  425. at the top and bottom.  This can be controlled by using the "Ignore 
  426. Transparent for Bend" setting on NO.  On your paint program cut 
  427. your brush, clear the screen, and stamp the brush in the middle of 
  428. the screen.  Then cut the brush with a large border above and below 
  429. which can be made transparent.
  430.  
  431. The transparent colours will not show up as part of your object 
  432. but will be included in calculation for how much to bend the tube.
  433.  
  434. With this you will not get a sphere but more of a sphere with the 
  435. top and bottom cut off.  This can be a good effect.
  436.  
  437. The same works for sine wave but there is not often the same 
  438. level of distortion with this.
  439.  
  440.  
  441.  
  442. Use the HAM threshhold setting around 2 or 3 for good looking 
  443. results with increased optimisation.
  444.  
  445.  
  446.  
  447. If you want more than the 64 colours in EHB and don't like the 
  448. fringing associated with HAM colours (which will be faithfully 
  449. converted over) then you can go to a little trouble and create your 
  450. objects in parts.  These can be quite easy to assemble.
  451.  
  452. Using DPaint -
  453.  
  454. Draw your brush using all available colours.  Use the coordinates 
  455. and cut it out and save it.
  456.  
  457. Change the palette and by using Stencil (in Dpaint) select the 
  458. background colour, invert the stencil then return to painting.  Use 
  459. one colour to paint over the pixels in the old brush.
  460.  
  461. Then change the stencil so that colour is protected and the 
  462. background colour free.  Draw around the old picture with your new 
  463. colours and when you have finished go back to stencil and protect 
  464. everything but the colour you used to write over the first pictures 
  465. pixels.  Now rub over them with the background colour.
  466.  
  467. Turn off the stencil.
  468.  
  469. Now cut the new brush with exactly the same size and start point 
  470. and save.
  471.  
  472. Convert both into objects and layer one over the other (they 
  473. should start that way when you load them in as scenes).
  474.  
  475.  
  476.  
  477. As well as just converting everyday brushes into objects you can 
  478. use Brush_4D as a simple object creator.  One use I find for it is 
  479. as a replacement for the checkered floor.  Make your own checkered 
  480. floor with something like a pattern fill and then convert it.  You 
  481. now have control over the size of your  GROUND and can have more 
  482. than two colours and don't have to place it horizontally at level 
  483. 0.  It can also have a texture.  Have more than one ground.
  484.  
  485.  
  486.  
  487. For stripey tubes make a row of colours with something like the 
  488. shaded fill in DPaint and wrap it to a tube.
  489.  
  490.  
  491.  
  492. Convert your favourite (colour) fonts over.  Make them 3D by 
  493. wrapping them around part of a tube, both forwards and backwards 
  494. bent and put together - no longer flat and boring.
  495.  
  496.  
  497.  
  498. Do nice keyframe animations with pictures fading into one 
  499. another, sine waves squirming as you alter the start and end angles 
  500. etc.  - just make sure you don't optimise and have no transparents 
  501. and have exactly the same size in your start and end brushes.
  502.  
  503.  
  504.  
  505. 8.      Errors.
  506.  
  507.  
  508.  
  509. You will be told throughout if anything goes wrong like not being 
  510. able to open the screen or files etc.
  511.  
  512. You might get the "Exceeded maximum vertices" or "Exceeded 
  513. maximum faces" message.  If this happens you should send off the 
  514. cash for the version without limits.  Alternatively reduce your 
  515. image (but lose detail).
  516.  
  517. If you run the programs but it returns immediately then you  may 
  518. not have the "mathtrans.library" or "req.library" in your  LIBS: 
  519. directory.
  520.  
  521. Check your stack size as well.
  522.  
  523.  
  524.  
  525. 9.      The Competition.
  526.  
  527.  
  528.  
  529. DigiWorks 3D ($US 130-160) - I see it as a complementary product 
  530. as it does only flat conversions (extrusions don't really count) 
  531. and doesn't handle colour at all.  It is nice though in finding 
  532. edges etc. for you.  With my program you will get "jaggies" on 
  533. diagonal edges, with DigiWorks you would get one diagonal line.
  534.  
  535. Living out of the way I haven't seen anything else which performs 
  536. similarly.  Perhaps you would like to send me some  :-)
  537.  
  538.  
  539.  
  540. 10.      The Address!
  541.  
  542.  
  543.  
  544. I am a poor student, and need your donations to buy 'Imagine'.  
  545. Future upgrades depend on your generosity.  These will be sent free 
  546. of charge when any important changes are made, to all registered 
  547. users.
  548.  
  549.  
  550.  
  551. Send your money to:
  552.  
  553.                     Bruce Thomson
  554.  
  555.                     PO Box 33116
  556.  
  557.                     Takapuna
  558.  
  559.                     Auckland
  560.  
  561.                     NEW ZEALAND
  562.  
  563.  
  564.  
  565. Make that $US cash or international cheques or money orders etc. 
  566. If you're in a kindly mood send all you've got, copies of any other 
  567. shareware/PD ray tracing utilities, comments, suggestions etc  $NZ 
  568. acceptable also.  Use current exchange rate.
  569.  
  570.  
  571.  
  572. 11.     Other Important Stuff.
  573.  
  574.  
  575.  
  576. This program is to be distributed with these docs intact and 
  577. unaltered.  The help picture is to accompany it.
  578.  
  579.  
  580.  
  581. Distribution of restricted version. (ie this package)
  582.  
  583. - This restricted version is freely uploadable to BBS's etc.
  584.  
  585. - Fred Fish can include it in his library.
  586.  
  587. - Other PD/Shareware libraries can distribute it if they are 
  588. not greedy, ie they charge no more than 150% of Fred 
  589. Fish's charges.
  590.  
  591. - Free User Group disk magazines, etc. may distribute it.
  592.  
  593. - Ask me if you want to distribute it packaged in any form 
  594. that is not covered above, that you will be charging any 
  595. money for - e.g. a disk that accompanies a magazine
  596.  
  597.  
  598.  
  599. The unrestricted version is for your private use only if you 
  600. decide to register.  It is not to be copied.
  601.  
  602.  
  603.  
  604.